

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>The widgetList module &mdash; pyamp v1.2 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="pyamp v1.2 documentation" href="../index.html" />
    <link rel="up" title="The qt module" href="mod_pyamp_ui_qt.html" />
    <link rel="next" title="The baseWidget module" href="pyamp_ui_qt_baseWidget.html" />
    <link rel="prev" title="The qt module" href="mod_pyamp_ui_qt.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pyamp_ui_qt_baseWidget.html" title="The baseWidget module"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="mod_pyamp_ui_qt.html" title="The qt module"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">pyamp v1.2 documentation</a> &raquo;</li>
          <li><a href="mod_pyamp.html" >The pyamp module</a> &raquo;</li>
          <li><a href="mod_pyamp_ui.html" >The ui module</a> &raquo;</li>
          <li><a href="mod_pyamp_ui_qt.html" accesskey="U">The qt module</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-pyamp.ui.qt.widgetList">
<span id="the-widgetlist-module"></span><h1>The widgetList module<a class="headerlink" href="#module-pyamp.ui.qt.widgetList" title="Permalink to this headline">¶</a></h1>
<p>Contains the WidgetList and ScrollableList classes which provide the
ability to create a list of widgets, and contain that list within a
QScrollArea.</p>
<div class="section" id="the-stylesheet-class">
<h2>The StyleSheet class<a class="headerlink" href="#the-stylesheet-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-151820269adf8a0e4e42455e20fbe17192dd4f31.png" alt="Inheritance diagram of pyamp.ui.qt.widgetList.StyleSheet" usemap="#inheritance2d13600101" class="inheritance"/>
<map id="inheritance2d13600101" name="inheritance2d13600101">
<area shape="rect" href="pyamp_ui_qt_styleSheet.html#pyamp.ui.qt.styleSheet.StyleSheet" title="pyamp.ui.qt.styleSheet.StyleSheet" alt="" coords="5,7,248,33"/>
</map>
</p>
<dl class="class">
<dt id="pyamp.ui.qt.widgetList.StyleSheet">
<em class="property">class </em><tt class="descclassname">pyamp.ui.qt.widgetList.</tt><tt class="descname">StyleSheet</tt><big>(</big><em>widget=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.StyleSheet" title="Permalink to this definition">¶</a></dt>
<dd><p>The StyleSheet class provides a wrapper for <tt class="xref py py-class docutils literal"><span class="pre">PyQt4.QtGui.QWidget</span></tt>
style sheet strings. StyleSheets can be easily created an exported into a
string that is properly formatted for setting the style sheet of a
<tt class="xref py py-class docutils literal"><span class="pre">PyQt4.QtGui.QWidget</span></tt>.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">PyQt4.QtGui</span> <span class="kn">import</span> <span class="n">QApplication</span><span class="p">,</span> <span class="n">QWidget</span>
<span class="kn">from</span> <span class="nn">pyamp.ui.qt</span> <span class="kn">import</span> <span class="n">StyleSheet</span>

<span class="c"># Create the widget, and set its name</span>
<span class="n">app</span> <span class="o">=</span> <span class="n">QApplication</span><span class="p">([])</span>
<span class="n">widget</span> <span class="o">=</span> <span class="n">QWidget</span><span class="p">()</span>
<span class="n">widget</span><span class="o">.</span><span class="n">setObjectName</span><span class="p">(</span><span class="s">&quot;ObjectName&quot;</span><span class="p">)</span>

<span class="c"># Create a simple style sheet</span>
<span class="n">style</span> <span class="o">=</span> <span class="n">StyleSheet</span><span class="p">(</span><span class="n">border</span><span class="o">=</span><span class="s">&quot;2px solid black&quot;</span><span class="p">)</span>
<span class="n">normal</span> <span class="o">=</span> <span class="s">&quot;border: 2px solid black&quot;</span>

<span class="c"># These calls are identical</span>
<span class="n">widget</span><span class="o">.</span><span class="n">setStyleSheet</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">style</span><span class="p">))</span>
<span class="n">widget</span><span class="o">.</span><span class="n">setStyleSheet</span><span class="p">(</span><span class="n">normal</span><span class="p">)</span>

<span class="c"># Create another style sheet, notice that underscores in the</span>
<span class="c"># StylSheet parameter names are converted to dashes in the</span>
<span class="c"># style sheet string</span>
<span class="n">style</span> <span class="o">=</span> <span class="n">StyleSheet</span><span class="p">(</span><span class="n">background_color</span><span class="o">=</span><span class="s">&quot;red&quot;</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="s">&quot;blue&quot;</span><span class="p">,</span>
                   <span class="n">font_weight</span><span class="o">=</span><span class="s">&quot;bold&quot;</span><span class="p">)</span>
<span class="n">normal</span> <span class="o">=</span> <span class="s">&quot;background-color: red; color: blue; font-weight: bold&quot;</span>

<span class="c"># These calls are identical</span>
<span class="n">widget</span><span class="o">.</span><span class="n">setStyleSheet</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">style</span><span class="p">))</span>
<span class="n">widget</span><span class="o">.</span><span class="n">setStyleSheet</span><span class="p">(</span><span class="n">normal</span><span class="p">)</span>

<span class="c"># You can also specify a specific CSS selector string, which can be</span>
<span class="c"># either a specific string, or a widget. If given a widget, the</span>
<span class="c"># selector will be created using the object&#39;s class name (e.g.,</span>
<span class="c"># QWidget) and will append an ID selector with the object&#39;s name (if</span>
<span class="c"># and only if the widget is named).</span>
<span class="n">style1</span> <span class="o">=</span> <span class="n">StyleSheet</span><span class="p">(</span><span class="n">widget</span><span class="o">=</span><span class="s">&quot;QWidget#ObjectName&quot;</span><span class="p">,</span>
                    <span class="n">border</span><span class="o">=</span><span class="s">&quot;1px solid red&quot;</span><span class="p">,</span> <span class="n">margin_top</span><span class="o">=</span><span class="s">&quot;10&quot;</span><span class="p">)</span>
<span class="n">style2</span> <span class="o">=</span> <span class="n">StyleSheet</span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> <span class="n">border</span><span class="o">=</span><span class="s">&quot;1px solid red&quot;</span><span class="p">,</span> <span class="n">margin_top</span><span class="o">=</span><span class="s">&quot;10&quot;</span><span class="p">)</span>
<span class="n">normal</span> <span class="o">=</span> <span class="s">&quot;QWidget#ObjectName { border: 1px solid red; margin-top: 10;&quot;</span>

<span class="c"># These calls are identical</span>
<span class="n">widget</span><span class="o">.</span><span class="n">setStyleSheet</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">style1</span><span class="p">))</span>
<span class="n">widget</span><span class="o">.</span><span class="n">setStyleSheet</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">style2</span><span class="p">))</span>
<span class="n">widget</span><span class="o">.</span><span class="n">setStyleSheet</span><span class="p">(</span><span class="n">normal</span><span class="p">)</span>
</pre></div>
</div>
<ul>
<li><dl class="first docutils">
<dt>widget &#8211; The widget selector for this style sheet. Can be either a</dt>
<dd><p class="first last">string, or an actual widget object</p>
</dd>
</dl>
</li>
<li><p class="first">kwargs &#8211; The keyword arguments</p>
</li>
</ul>
</dd></dl>

</div>
<div class="section" id="the-resizepolicy-class">
<h2>The ResizePolicy class<a class="headerlink" href="#the-resizepolicy-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-f8595d45d168f45ce431ceb58712d59169ba6b9a.png" alt="Inheritance diagram of pyamp.ui.qt.widgetList.ResizePolicy" usemap="#inheritance77460fb996" class="inheritance"/>
<map id="inheritance77460fb996" name="inheritance77460fb996">
<area shape="rect" href="pyamp_ui_qt_resizePolicy.html#pyamp.ui.qt.resizePolicy.ResizePolicy" title="pyamp.ui.qt.resizePolicy.ResizePolicy" alt="" coords="5,7,259,33"/>
</map>
</p>
<dl class="class">
<dt id="pyamp.ui.qt.widgetList.ResizePolicy">
<em class="property">class </em><tt class="descclassname">pyamp.ui.qt.widgetList.</tt><tt class="descname">ResizePolicy</tt><a class="headerlink" href="#pyamp.ui.qt.widgetList.ResizePolicy" title="Permalink to this definition">¶</a></dt>
<dd><p>The ResizePolicy encapsulates a specific policy for resizing widgets.</p>
<p>The possible resize policies are:</p>
<blockquote>
<ul class="simple">
<li><strong>Fixed</strong> &#8211; The size never changes</li>
<li><strong>Expanding</strong> &#8211; The size expands</li>
</ul>
</blockquote>
<p>For a specific policy, the ResizePolicy class can return the correct size
for a widget, given the widget&#8217;s current size as well as the size of all
of the widget&#8217;s child widgets.</p>
<p>For the <em>Fixed</em> resize policy: the size will always remain the same.</p>
<p>For the <em>Expanding</em> resize policy: the size will always expand to fit all
of the widget&#8217;s children.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">PyQt4</span> <span class="kn">import</span> <span class="n">QtCore</span>
<span class="kn">from</span> <span class="nn">pyamp.ui.qt</span> <span class="kn">import</span> <span class="n">ResizePolicy</span>

<span class="c"># Create the size of the widget, and the list of sizes for all of</span>
<span class="c"># the widget&#39;s children</span>
<span class="n">size</span> <span class="o">=</span> <span class="n">QtCore</span><span class="o">.</span><span class="n">QSize</span><span class="p">(</span><span class="mi">100</span><span class="p">,</span> <span class="mi">200</span><span class="p">)</span>
<span class="n">childSizes</span> <span class="o">=</span> <span class="p">[</span><span class="n">QtCore</span><span class="o">.</span><span class="n">QSize</span><span class="p">(</span><span class="mi">200</span><span class="p">,</span> <span class="mi">500</span><span class="p">),</span> <span class="n">QtCore</span><span class="o">.</span><span class="n">QSize</span><span class="p">(</span><span class="mi">300</span><span class="p">,</span> <span class="mi">400</span><span class="p">)]</span>

<span class="c"># Get the list of widths and heights for the child widgets</span>
<span class="n">childWidths</span> <span class="o">=</span> <span class="nb">map</span><span class="p">(</span><span class="n">QtCore</span><span class="o">.</span><span class="n">QSize</span><span class="o">.</span><span class="n">width</span><span class="p">,</span> <span class="n">childSizes</span><span class="p">)</span>
<span class="n">childHeights</span> <span class="o">=</span> <span class="nb">map</span><span class="p">(</span><span class="n">QtCore</span><span class="o">.</span><span class="n">QSize</span><span class="o">.</span><span class="n">width</span><span class="p">,</span> <span class="n">childSizes</span><span class="p">)</span>

<span class="c"># Both of these return: 100</span>
<span class="c"># Which is the given value of width</span>
<span class="n">ResizePolicy</span><span class="o">.</span><span class="n">getSize</span><span class="p">(</span><span class="n">ResizePolicy</span><span class="o">.</span><span class="n">Fixed</span><span class="p">,</span> <span class="n">size</span><span class="o">.</span><span class="n">width</span><span class="p">(),</span> <span class="n">childWidths</span><span class="p">)</span>
<span class="n">ResizePolicy</span><span class="o">.</span><span class="n">getWidth</span><span class="p">(</span><span class="n">ResizePolicy</span><span class="o">.</span><span class="n">Fixed</span><span class="p">,</span> <span class="n">size</span><span class="p">,</span> <span class="n">childSizes</span><span class="p">)</span>

<span class="c"># Both of these return: 900</span>
<span class="c"># Which is the sum of the childHeights list</span>
<span class="n">ResizePolicy</span><span class="o">.</span><span class="n">getSize</span><span class="p">(</span><span class="n">ResizePolicy</span><span class="o">.</span><span class="n">Expanding</span><span class="p">,</span> <span class="n">size</span><span class="o">.</span><span class="n">height</span><span class="p">(),</span>
                     <span class="n">childHeights</span><span class="p">)</span>
<span class="n">ResizePolicy</span><span class="o">.</span><span class="n">getHeight</span><span class="p">(</span><span class="n">ResizePolicy</span><span class="o">.</span><span class="n">Fixed</span><span class="p">,</span> <span class="n">size</span><span class="p">,</span> <span class="n">childSizes</span><span class="p">)</span>
</pre></div>
</div>
<dl class="classmethod">
<dt id="pyamp.ui.qt.widgetList.ResizePolicy.getHeight">
<em class="property">classmethod </em><tt class="descname">getHeight</tt><big>(</big><em>policy</em>, <em>size</em>, <em>sizeList</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.ResizePolicy.getHeight" title="Permalink to this definition">¶</a></dt>
<dd><p>For the given resize policy, get the correct height for the size of
the widget as well as the size of all of the widget&#8217;s children.</p>
<ul class="simple">
<li>resizePolicy &#8211; The resize policy</li>
<li>size &#8211; The main <tt class="xref py py-class docutils literal"><span class="pre">PyQt4.QtCore.QSize</span></tt> of the widget</li>
<li>sizeList &#8211; The list of <tt class="xref py py-class docutils literal"><span class="pre">PyQt4.QtCore.QSize</span></tt> for sub widgets</li>
</ul>
</dd></dl>

<dl class="classmethod">
<dt id="pyamp.ui.qt.widgetList.ResizePolicy.getSize">
<em class="property">classmethod </em><tt class="descname">getSize</tt><big>(</big><em>policy</em>, <em>size</em>, <em>sizeList</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.ResizePolicy.getSize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the correct size based on the given resize policy.</p>
<ul>
<li><p class="first">resizePolicy &#8211; The resize policy</p>
</li>
<li><p class="first">size &#8211; The main single size (width or height) of the widget</p>
</li>
<li><dl class="first docutils">
<dt>sizeList &#8211; The list of the single dimension size (widths or heights)</dt>
<dd><p class="first last">of widgets&#8217;s children</p>
</dd>
</dl>
</li>
</ul>
</dd></dl>

<dl class="classmethod">
<dt id="pyamp.ui.qt.widgetList.ResizePolicy.getWidth">
<em class="property">classmethod </em><tt class="descname">getWidth</tt><big>(</big><em>policy</em>, <em>size</em>, <em>sizeList</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.ResizePolicy.getWidth" title="Permalink to this definition">¶</a></dt>
<dd><p>For the given resize policy, get the correct width for the size of
the widget as well as the size of all of the widget&#8217;s children.</p>
<ul class="simple">
<li>resizePolicy &#8211; The resize policy</li>
<li>size &#8211; The main <tt class="xref py py-class docutils literal"><span class="pre">PyQt4.QtCore.QSize</span></tt> of the widget</li>
<li>sizeList &#8211; The list of <tt class="xref py py-class docutils literal"><span class="pre">PyQt4.QtCore.QSize</span></tt> for sub widgets</li>
</ul>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="the-basewidget-class">
<h2>The BaseWidget class<a class="headerlink" href="#the-basewidget-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-6b0805fd9eba1f4a6f421d728a2ae996b6437f5d.png" alt="Inheritance diagram of pyamp.ui.qt.widgetList.BaseWidget" usemap="#inheritance3ad9743ba6" class="inheritance"/>
<map id="inheritance3ad9743ba6" name="inheritance3ad9743ba6">
<area shape="rect" href="pyamp_logging_loggable.html#pyamp.logging.loggable.Loggable" title="pyamp.logging.loggable.Loggable" alt="" coords="5,140,208,163"/>
<area shape="rect" href="pyamp_ui_qt_baseView.html#pyamp.ui.qt.baseView.BaseView" title="pyamp.ui.qt.baseView.BaseView" alt="" coords="319,206,513,229"/>
<area shape="rect" href="pyamp_ui_qt_baseWidget.html#pyamp.ui.qt.baseWidget.BaseWidget" title="pyamp.ui.qt.baseWidget.BaseWidget" alt="" coords="446,273,665,296"/>
<area shape="rect" href="pyamp_patterns_interfaces_requiredProperties.html#pyamp.patterns.interfaces.requiredProperties.RequiredProperties" title="pyamp.patterns.interfaces.requiredProperties.RequiredProperties" alt="" coords="228,140,604,163"/>
</map>
</p>
<dl class="class">
<dt id="pyamp.ui.qt.widgetList.BaseWidget">
<em class="property">class </em><tt class="descclassname">pyamp.ui.qt.widgetList.</tt><tt class="descname">BaseWidget</tt><big>(</big><em>name=None</em>, <em>controller=None</em>, <em>mainWindow=None</em>, <em>logData=None</em>, <em>logColor=0</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget" title="Permalink to this definition">¶</a></dt>
<dd><p>The BaseWidget class provides an implementation of the
<tt class="xref py py-class docutils literal"><span class="pre">amp.ui.qt.BaseView</span></tt> class designed to set up and create a
<tt class="xref py py-class docutils literal"><span class="pre">PyQt4.QtGui.QWidget</span></tt> object.</p>
<p>This class provides serveral functions which can be overridden by
subclasses to easily add features to the BaseWidget. These functions
are called in the following order during the set up process:</p>
<blockquote>
<ol class="arabic simple">
<li>configure()</li>
<li>configureLayout()</li>
<li>createElements()</li>
<li>setupConnections()</li>
</ol>
</blockquote>
<ul class="simple">
<li>name &#8211; The name of the BaseWidget</li>
<li>controller &#8211; The controller for the BaseWidget</li>
<li>mainWindow &#8211; The main window</li>
<li>logData &#8211; The <a class="reference internal" href="../logging.html#pyamp.logging.LogData" title="pyamp.logging.LogData"><tt class="xref py py-class docutils literal"><span class="pre">pyamp.logging.LogData</span></tt></a> object</li>
<li>logColor &#8211; The color to use for logging</li>
</ul>
<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.addElement">
<tt class="descname">addElement</tt><big>(</big><em>element</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.addElement" title="Permalink to this definition">¶</a></dt>
<dd><p>Add an element to the main layout.</p>
<ul class="simple">
<li>element &#8211; The element to add</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.addElements">
<tt class="descname">addElements</tt><big>(</big><em>elements</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.addElements" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a list of elements to the main layout.</p>
<ul class="simple">
<li>elements &#8211; The list of elements</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.addItem">
<tt class="descname">addItem</tt><big>(</big><em>item</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.addItem" title="Permalink to this definition">¶</a></dt>
<dd><p>Add an item to the main layout.</p>
<ul class="simple">
<li>item &#8211; The item to add</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.addWidget">
<tt class="descname">addWidget</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.addWidget" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a widget to the main layout.</p>
<ul class="simple">
<li>widget &#8211; The widget to add</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.clear">
<tt class="descname">clear</tt><big>(</big><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.clear" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove all of the child widgets and items currently for this
BaseWidget.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.clearItems">
<tt class="descname">clearItems</tt><big>(</big><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.clearItems" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear all the items from this BaseWidget.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.clearWidgets">
<tt class="descname">clearWidgets</tt><big>(</big><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.clearWidgets" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear all the widgets from this BaseWidget.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.configure">
<tt class="descname">configure</tt><big>(</big><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.configure" title="Permalink to this definition">¶</a></dt>
<dd><p>Configure the view.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.configureLayout">
<tt class="descname">configureLayout</tt><big>(</big><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.configureLayout" title="Permalink to this definition">¶</a></dt>
<dd><p>Configure the layout for this view.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.createElements">
<tt class="descname">createElements</tt><big>(</big><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.createElements" title="Permalink to this definition">¶</a></dt>
<dd><p>Create the elements for this view. Return the list of widgets,
or items in the order that they should be added to the layout.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.createLayout">
<tt class="descname">createLayout</tt><big>(</big><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.createLayout" title="Permalink to this definition">¶</a></dt>
<dd><p>Create the main layout.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.getItems">
<tt class="descname">getItems</tt><big>(</big><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.getItems" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of child items for this BaseWidget.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.getWidgets">
<tt class="descname">getWidgets</tt><big>(</big><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.getWidgets" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of child widgets for this BaseWidget.</p>
</dd></dl>

<dl class="attribute">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.layoutType">
<tt class="descname">layoutType</tt><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.layoutType" title="Permalink to this definition">¶</a></dt>
<dd><p>The layoutType property contains the type of layout to use for this
Widget. It should be a value from the <tt class="xref py py-class docutils literal"><span class="pre">LayoutType</span></tt> class.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.paintEvent">
<tt class="descname">paintEvent</tt><big>(</big><em>_event</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.paintEvent" title="Permalink to this definition">¶</a></dt>
<dd><p>Override the paintEvent function to allow StylSheets to work for
this QWidget.</p>
<dl class="docutils">
<dt>Note this function was taken from the documentation of style sheets</dt>
<dd>for custom QWidget classes.</dd>
</dl>
<ul class="simple">
<li>_event &#8211; The QPaintEvent</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.setMargins">
<tt class="descname">setMargins</tt><big>(</big><em>left=None</em>, <em>top=None</em>, <em>right=None</em>, <em>bottom=None</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.setMargins" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the content margins for this widget&#8217;s layout.</p>
<ul class="simple">
<li>left &#8211; The left margin</li>
<li>top &#8211; The top margin</li>
<li>right &#8211; The right margin</li>
<li>bottom &#8211; The bottom margin</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.setSpacing">
<tt class="descname">setSpacing</tt><big>(</big><em>spacing</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.setSpacing" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the spacing between components in the layout.</p>
<ul class="simple">
<li>spacing &#8211; The spacing</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.setStyleSheet">
<tt class="descname">setStyleSheet</tt><big>(</big><em>styleSheet</em><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.setStyleSheet" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the style sheet for this widget.</p>
<ul class="simple">
<li>styleSheet &#8211; The StyleSheet</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.setupConnections">
<tt class="descname">setupConnections</tt><big>(</big><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.setupConnections" title="Permalink to this definition">¶</a></dt>
<dd><p>Set up any connections this view requires.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.setupView">
<tt class="descname">setupView</tt><big>(</big><big>)</big><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.setupView" title="Permalink to this definition">¶</a></dt>
<dd><p>Create and set up this view.</p>
</dd></dl>

<dl class="attribute">
<dt id="pyamp.ui.qt.widgetList.BaseWidget.tabOrder">
<tt class="descname">tabOrder</tt><a class="headerlink" href="#pyamp.ui.qt.widgetList.BaseWidget.tabOrder" title="Permalink to this definition">¶</a></dt>
<dd><p>The tabOrder property allows concrete widgets to set their tab order.
Each element in the list will be tab connected to the next element in
the list. The list will cycle around to the front so the final element
is tab connected to the first element.</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="the-widgetlist-class">
<h2>The WidgetList class<a class="headerlink" href="#the-widgetlist-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-358bcc9b23ac2819d1bb5ecb0eccb4c9dd6bedac.png" alt="Inheritance diagram of pyamp.ui.qt.widgetList.WidgetList" usemap="#inheritance8906e3c272" class="inheritance"/>
<map id="inheritance8906e3c272" name="inheritance8906e3c272">
<area shape="rect" href="pyamp_logging_loggable.html#pyamp.logging.loggable.Loggable" title="pyamp.logging.loggable.Loggable" alt="" coords="5,140,208,163"/>
<area shape="rect" href="pyamp_ui_qt_baseView.html#pyamp.ui.qt.baseView.BaseView" title="pyamp.ui.qt.baseView.BaseView" alt="" coords="319,206,513,229"/>
<area shape="rect" href="pyamp_ui_qt_baseWidget.html#pyamp.ui.qt.baseWidget.BaseWidget" title="pyamp.ui.qt.baseWidget.BaseWidget" alt="" coords="446,273,665,296"/>
<area shape="rect" href="#pyamp.ui.qt.widgetList.WidgetList" title="pyamp.ui.qt.widgetList.WidgetList" alt="" coords="455,340,656,363"/>
<area shape="rect" href="pyamp_patterns_interfaces_requiredProperties.html#pyamp.patterns.interfaces.requiredProperties.RequiredProperties" title="pyamp.patterns.interfaces.requiredProperties.RequiredProperties" alt="" coords="228,140,604,163"/>
</map>
</p>
<dl class="class">
<dt id="pyamp.ui.qt.widgetList.WidgetList">
<em class="property">class </em><tt class="descclassname">pyamp.ui.qt.widgetList.</tt><tt class="descname">WidgetList</tt><big>(</big><em>name=None</em>, <em>controller=None</em>, <em>mainWindow=None</em>, <em>logData=None</em>, <em>logColor=0</em><big>)</big><a class="reference internal" href="../_modules/pyamp/ui/qt/widgetList.html#WidgetList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.ui.qt.widgetList.WidgetList" title="Permalink to this definition">¶</a></dt>
<dd><p>The WidgetList class defines a BaseWidget object that has the ability
to display a list of widgets vertically one after the other. This class
handles resizing the widget appropriately based on the widgets that
are in the list.</p>
<ul class="simple">
<li>name &#8211; The name of the BaseWidget</li>
<li>controller &#8211; The controller for the BaseWidget</li>
<li>mainWindow &#8211; The main window</li>
<li>logData &#8211; The <a class="reference internal" href="../logging.html#pyamp.logging.LogData" title="pyamp.logging.LogData"><tt class="xref py py-class docutils literal"><span class="pre">pyamp.logging.LogData</span></tt></a> object</li>
<li>logColor &#8211; The color to use for logging</li>
</ul>
<dl class="method">
<dt id="pyamp.ui.qt.widgetList.WidgetList.addItem">
<tt class="descname">addItem</tt><big>(</big><em>item</em><big>)</big><a class="reference internal" href="../_modules/pyamp/ui/qt/widgetList.html#WidgetList.addItem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.ui.qt.widgetList.WidgetList.addItem" title="Permalink to this definition">¶</a></dt>
<dd><p>Add an item to the widget list.</p>
<ul class="simple">
<li>item &#8211; The item to add</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.WidgetList.addWidget">
<tt class="descname">addWidget</tt><big>(</big><em>widget</em><big>)</big><a class="reference internal" href="../_modules/pyamp/ui/qt/widgetList.html#WidgetList.addWidget"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.ui.qt.widgetList.WidgetList.addWidget" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a widget to this widget list.</p>
<ul class="simple">
<li>widget &#8211; The widget to add</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.WidgetList.clear">
<tt class="descname">clear</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/pyamp/ui/qt/widgetList.html#WidgetList.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.ui.qt.widgetList.WidgetList.clear" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear all the widgets from the list.</p>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.WidgetList.setHorizontalRezizePolicy">
<tt class="descname">setHorizontalRezizePolicy</tt><big>(</big><em>policy</em><big>)</big><a class="reference internal" href="../_modules/pyamp/ui/qt/widgetList.html#WidgetList.setHorizontalRezizePolicy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.ui.qt.widgetList.WidgetList.setHorizontalRezizePolicy" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the horizontal resize policy.</p>
<ul class="simple">
<li>policy &#8211; The new resize policy</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.WidgetList.setMargin">
<tt class="descname">setMargin</tt><big>(</big><em>margin</em><big>)</big><a class="reference internal" href="../_modules/pyamp/ui/qt/widgetList.html#WidgetList.setMargin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.ui.qt.widgetList.WidgetList.setMargin" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the margin for this widget list.</p>
<ul class="simple">
<li>margin &#8211; The margin to use</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pyamp.ui.qt.widgetList.WidgetList.setVerticalResizePolicy">
<tt class="descname">setVerticalResizePolicy</tt><big>(</big><em>policy</em><big>)</big><a class="reference internal" href="../_modules/pyamp/ui/qt/widgetList.html#WidgetList.setVerticalResizePolicy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyamp.ui.qt.widgetList.WidgetList.setVerticalResizePolicy" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the vertical resize policy.</p>
<ul class="simple">
<li>policy &#8211; The new resize policy</li>
</ul>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">The widgetList module</a><ul>
<li><a class="reference internal" href="#the-stylesheet-class">The StyleSheet class</a></li>
<li><a class="reference internal" href="#the-resizepolicy-class">The ResizePolicy class</a></li>
<li><a class="reference internal" href="#the-basewidget-class">The BaseWidget class</a></li>
<li><a class="reference internal" href="#the-widgetlist-class">The WidgetList class</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="mod_pyamp_ui_qt.html"
                        title="previous chapter">The qt module</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="pyamp_ui_qt_baseWidget.html"
                        title="next chapter">The baseWidget module</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/_generated/pyamp_ui_qt_widgetList.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pyamp_ui_qt_baseWidget.html" title="The baseWidget module"
             >next</a> |</li>
        <li class="right" >
          <a href="mod_pyamp_ui_qt.html" title="The qt module"
             >previous</a> |</li>
        <li><a href="../index.html">pyamp v1.2 documentation</a> &raquo;</li>
          <li><a href="mod_pyamp.html" >The pyamp module</a> &raquo;</li>
          <li><a href="mod_pyamp_ui.html" >The ui module</a> &raquo;</li>
          <li><a href="mod_pyamp_ui_qt.html" >The qt module</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, Brett Ponsler.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
    </div>
  </body>
</html>